<include file='Public/header' />
<body class="hold-transition skin-blue sidebar-mini">
<div class="wrapper">
    <!-- Main Header -->
    <header class="main-header">

        <!-- Logo -->
        <a href="{:U('Index/index')}" class="logo">
            <span class="logo-lg">{$Think.config.SITE_TITLE} - 后台管理系统</span>
        </a>

        <!-- Header Navbar -->
        <nav class="navbar navbar-static-top" role="navigation">
            <!-- Sidebar toggle button-->
            <a href="#" class="sidebar-toggle" data-toggle="offcanvas" role="button">
                <span class="sr-only">Toggle navigation</span>
            </a>

            <!-- Navbar Right Menu -->
            <div class="navbar-custom-menu">
                <ul class="nav navbar-nav">
                    <li>
                        <a href="__APP__/Index/index" target="_blank"> <i class="fa fa-desktop"></i> 前往前台 </a>
                    </li>
                    <li>
                        <a href="{:U('Public/logout')}"> <i class="fa fa-close"></i> 退出登录</a>
                    </li>
                    <!-- /.messages-menu -->
                </ul>
            </div>
        </nav>
    </header>
    <!-- Left side column. contains the logo and sidebar -->
    <aside class="main-sidebar">

        <!-- sidebar: style can be found in sidebar.less -->
        <section class="sidebar">
            <!-- search form (Optional) -->
            <form action="{:U('search')}" method="get" class="sidebar-form">
                <div class="input-group">
                    <input type="text" name="keywords" class="form-control" placeholder="Search..." value="{$Think.get.keywords}">
              <span class="input-group-btn">
                <button type="submit" id="search-btn" class="btn btn-flat"><i class="fa fa-search"></i>
                </button>
              </span>
                </div>
            </form>
            <!-- /.search form -->

            <!-- Sidebar Menu -->
            <ul class="sidebar-menu">
                <li class="header">主菜单</li>
                <!-- Optionally, you can add icons to the links -->

                <foreach name="Think.session.admin_menu" key="key" item="top">
                    <li class="treeview <eq name="activeId" value="$top['id']">active</eq>" >

                        <a href="javascript:;"><i class="fa fa-link"></i> <span>{$top.name}</span>
                            <span class="pull-right-container">
                                <i class="fa fa-angle-left pull-right"></i>
                            </span>
                        </a>
                        <ul class="treeview-menu">
                            <foreach name="top.item" item="mid">
                            <li <eq name="rule" value="$mid['url']">class="active"</eq> > <a href="{:U($mid['url'])}"><i class="fa fa-circle-o"></i>{$mid.name}</a></li>
                            </foreach>
                        </ul>
                    </li>
                </foreach>

                <li class="header">自定义菜单</li>
                <li><a href="#"><i class="fa fa-circle-o text-red"></i> <span>Important</span></a></li>
                <li><a href="#"><i class="fa fa-circle-o text-yellow"></i> <span>Warning</span></a></li>
                <li><a href="#"><i class="fa fa-circle-o text-aqua"></i> <span>Information</span></a></li>
            </ul>
            <!-- /.sidebar-menu -->
        </section>
        <!-- /.sidebar -->
    </aside>

    <!-- Content Wrapper. Contains page content -->
    <div class="content-wrapper">
        <!-- Main content -->
        <section class="content">
            <block name="content"></block>
        </section>
        <!-- /.content -->
    </div>
    <!-- /.content-wrapper -->
</div>
<include file='Public/footer' />